using System;
using AbpStudy.Permissions;
using AbpStudy.Entity.Dtos;
using Volo.Abp.Application.Dtos;
using Volo.Abp.Application.Services;

namespace AbpStudy.Entity
{
    public class AuthorAppService : CrudAppService<Author, AuthorDto, Guid, PagedAndSortedResultRequestDto, CreateUpdateAuthorDto, CreateUpdateAuthorDto>,
        IAuthorAppService
    {
        protected override string GetPolicyName { get; set; } = AbpStudyPermissions.Author.Default;
        protected override string GetListPolicyName { get; set; } = AbpStudyPermissions.Author.Default;
        protected override string CreatePolicyName { get; set; } = AbpStudyPermissions.Author.Create;
        protected override string UpdatePolicyName { get; set; } = AbpStudyPermissions.Author.Update;
        protected override string DeletePolicyName { get; set; } = AbpStudyPermissions.Author.Delete;

        private readonly IAuthorRepository _repository;
        
        public AuthorAppService(IAuthorRepository repository) : base(repository)
        {
            _repository = repository;
        }
    }
}
